<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.prime.com.tr/ui"
	template="/WEB-INF/jsf/template.xhtml">

	<ui:define name="content">
		<h:form prependId="false">
			<p:commandButton image="back" ajax="false" immediate="true" style="margin-right:20px;" value="#{rolesmsgs['navigation.back']}" action="/jsf/roles/listRoless.xhtml"/>
		
			<p:panel header="#{rolesmsgs['roles.title']} Details" style="margin-top:10px">
				<p:messages />
				<h:panelGrid id="detail" columns="2" styleClass="grid" columnClasses="label,value">
						<h:outputText value="#{rolesmsgs['roles.rolrole.title']}:" />
							<h:outputText value="#{RolesComponent.roles.rolRole}"/>
						<h:outputText value="#{rolesmsgs['roles.roldescription.title']}:" />
							<h:outputText value="#{RolesComponent.roles.rolDescription}"/>
						<h:outputText value="#{rolesmsgs['roles.rolphysiquemorale.title']}:" />
							<h:outputText value="#{RolesComponent.roles.rolPhysiqueMorale}"/>
				</h:panelGrid>
			</p:panel>

			<p:panel header="#{rolesmsgs['rolestiers.title']} Details" style="margin-top:10px">
			<p:commandButton image="new" ajax="false" style="margin-right:20px;" value="#{rolesmsgs['navigation.new']}" action="#{RolesComponent.newRolesRolesTierses(RolesComponent.roles.rolRole)}"/>
			<p:dataTable id="rolesTierses" value="#{RolesComponent.listRolesRolesTierses(RolesComponent.roles.rolRole)}"  var="current" rows="10" paginator="true" paginatorPosition="bottom">
				<p:column>
					<h:commandLink includeViewParams="true" action="#{RolesComponent.selectRolesRolesTierses(RolesComponent.roles.rolRole, current.rotRole, current.rotTiers)}" >
						<h:graphicImage value="/images/icons/view.gif" style="border:0;"/>
					</h:commandLink>
					<h:commandLink includeViewParams="true" action="#{RolesComponent.editRolesRolesTierses(RolesComponent.roles.rolRole, current.rotRole, current.rotTiers)}" >
						<h:graphicImage value="/images/icons/edit.gif" style="border:0;"/>
					</h:commandLink>
					<h:commandLink includeViewParams="true" action="#{RolesComponent.confirmDeleteRolesRolesTierses(RolesComponent.roles.rolRole, current.rotRole, current.rotTiers)}" >
						<h:graphicImage value="/images/icons/delete.gif" style="border:0;"/>
					</h:commandLink>
				</p:column>
				<p:column> 
					<f:facet name="header">
						<h:outputText value="#{rolesmsgs['rolestiers.rotrole.title']}" />
					</f:facet>
							<h:outputText value="#{current.rotRole}"/>
				</p:column>
				<p:column> 
					<f:facet name="header">
						<h:outputText value="#{rolesmsgs['rolestiers.rottiers.title']}" />
					</f:facet>
							<h:outputText value="#{current.rotTiers}"/>
				</p:column>
				<p:column> 
					<f:facet name="header">
						<h:outputText value="#{rolesmsgs['rolestiers.rotdescriptif.title']}" />
					</f:facet>
							<h:outputText value="#{current.rotDescriptif}"/>
				</p:column>
				<p:column> 
					<f:facet name="header">
						<h:outputText value="#{rolesmsgs['rolestiers.rotdatedebut.title']}" />
					</f:facet>
							<h:outputText value="#{current.rotDateDebut}"  converter="dateConverterForCalendar" />
				</p:column>
				<p:column> 
					<f:facet name="header">
						<h:outputText value="#{rolesmsgs['rolestiers.rotdatefin.title']}" />
					</f:facet>
							<h:outputText value="#{current.rotDateFin}"  converter="dateConverterForCalendar" />
				</p:column>
			</p:dataTable>
			</p:panel>
		</h:form>
	</ui:define>
</ui:composition>